package com.wt.struggle.goodbye.info

import android.os.Parcel
import android.os.Parcelable

class ProUserInfo() : Parcelable {

    var id: Int = 0
    var openid: String? = ""
    var unionid: String? = ""
    var nickname: String? = ""
    var sex: Int = 0
    var headimgurl: String? = ""
    var avatarurl: String? = ""
    var avatar: Int = 0
    var nickName: String? = ""
    var mobile: String? = ""
    var appUserId: String? = ""
    var realName: String? = ""
    var signature: String? = ""
    var provence: String? = ""
    var city: String? = ""
    var district: String? = ""
    var address: String? = ""
    var email: String? = ""
    var countOfcollectionContent: Int = 0
    var countOfcollectionUser: Int = 0
    var countOffans: Int = 0
    var countOfjoinCircle: Int = 0
    var account: String? = ""
    var pwd: String? = ""
    var numberOfUserCollected: String = ""

    /**
     * 是否关注
     */
    var status: Int? = 0

    /**
     * 内容收藏数量
     */
    var numberOfContentCollected: Int? = 0
    /**
     * 圈子收藏数量
     */
    var numberOfCircleCollected: Int = 0
    /**
     * 加入的圈子数量
     */
    var numberOfCircle: Int = 0

    /**
     * 粉丝数量
     */
    var numberOfFans: Int = 0

    var numberOfContent: Int = 0

    /**
     * 关注数量
     */
    var numberOfCollected: Int = 0


    var contentId: Int = 0
    var commentId: String = ""
    var commentID: Int = 0
    var content: String? = ""
    var pics: String? = ""
    var lat: String? = ""
    var lng: String? = ""
    var location: String? = ""

    var messgeId: String = ""

    var gender: String? = ""
    var country: String? = ""
    var cardType: String? = ""
    var cardNo: String? = ""
    var cardPeriod: String? = ""
    var isCollection: Int = 0

    constructor(parcel: Parcel) : this() {
        id = parcel.readInt()
        openid = parcel.readString()
        unionid = parcel.readString()
        nickname = parcel.readString()
        sex = parcel.readInt()
        headimgurl = parcel.readString()
        avatarurl = parcel.readString()
        avatar = parcel.readInt()
        nickName = parcel.readString()
        mobile = parcel.readString()
        appUserId = parcel.readString()
        realName = parcel.readString()
        signature = parcel.readString()
        provence = parcel.readString()
        city = parcel.readString()
        district = parcel.readString()
        address = parcel.readString()
        email = parcel.readString()
        countOfcollectionContent = parcel.readInt()
        countOfcollectionUser = parcel.readInt()
        countOffans = parcel.readInt()
        countOfjoinCircle = parcel.readInt()
        account = parcel.readString()
        pwd = parcel.readString()
        status = parcel.readValue(Int::class.java.classLoader) as? Int
        numberOfContentCollected = parcel.readValue(Int::class.java.classLoader) as? Int
        numberOfCircleCollected = parcel.readInt()
        numberOfCircle = parcel.readInt()
        numberOfFans = parcel.readInt()
        numberOfContent = parcel.readInt()
        numberOfCollected = parcel.readInt()
        contentId = parcel.readInt()
        commentID = parcel.readInt()
        content = parcel.readString()
        pics = parcel.readString()
        lat = parcel.readString()
        lng = parcel.readString()
        location = parcel.readString()
        gender = parcel.readString()
        country = parcel.readString()
        cardType = parcel.readString()
        cardNo = parcel.readString()
        cardPeriod = parcel.readString()
        isCollection = parcel.readInt()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeInt(id)
        parcel.writeString(openid)
        parcel.writeString(unionid)
        parcel.writeString(nickname)
        parcel.writeInt(sex)
        parcel.writeString(headimgurl)
        parcel.writeString(avatarurl)
        parcel.writeInt(avatar)
        parcel.writeString(nickName)
        parcel.writeString(mobile)
        parcel.writeString(appUserId)
        parcel.writeString(realName)
        parcel.writeString(signature)
        parcel.writeString(provence)
        parcel.writeString(city)
        parcel.writeString(district)
        parcel.writeString(address)
        parcel.writeString(email)
        parcel.writeInt(countOfcollectionContent)
        parcel.writeInt(countOfcollectionUser)
        parcel.writeInt(countOffans)
        parcel.writeInt(countOfjoinCircle)
        parcel.writeString(account)
        parcel.writeString(pwd)
        parcel.writeValue(status)
        parcel.writeValue(numberOfContentCollected)
        parcel.writeInt(numberOfCircleCollected)
        parcel.writeInt(numberOfCircle)
        parcel.writeInt(numberOfFans)
        parcel.writeInt(numberOfContent)
        parcel.writeInt(numberOfCollected)
        parcel.writeInt(contentId)
        parcel.writeInt(commentID)
        parcel.writeString(content)
        parcel.writeString(pics)
        parcel.writeString(lat)
        parcel.writeString(lng)
        parcel.writeString(location)
        parcel.writeString(gender)
        parcel.writeString(country)
        parcel.writeString(cardType)
        parcel.writeString(cardNo)
        parcel.writeString(cardPeriod)
        parcel.writeInt(isCollection)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<ProUserInfo> {
        override fun createFromParcel(parcel: Parcel): ProUserInfo {
            return ProUserInfo(parcel)
        }

        override fun newArray(size: Int): Array<ProUserInfo?> {
            return arrayOfNulls(size)
        }
    }

}